#include "MyVector.h"
#include <iostream>

int main() {
  using namespace std;
  cout << "列表初始化" << endl;
  MyVector<int> v1{1, 2, 3, 4};
  cout << "size: " << v1.size() << endl;
  cout << "capacity: " << v1.capacity() << endl;
  cout << "push_back" << endl;
  v1.push_back(5);
  cout << "size: " << v1.size() << endl;
  cout << "capacity: " << v1.capacity() << endl;
  cout << "拷贝构造函数" << endl;
  MyVector v2(v1);
  cout << "size: " << v2.size() << endl;
  cout << "capacity: " << v2.capacity() << endl;
  v2.push_back(7);
  cout << "size: " << v1.size() << endl;
  cout << "capacity: " << v1.capacity() << endl;
  cout << "size: " << v2.size() << endl;
  cout << "capacity: " << v2.capacity() << endl;
  cout << "移动构造函数" << endl;
  MyVector v3(std::move(v1));
  cout << "size: " << v1.size() << endl;
  cout << "capacity: " << v1.capacity() << endl;
  cout << "size: " << v3.size() << endl;
  cout << "capacity: " << v3.capacity() << endl;

  return 0;
}